/*
 * @(#)XmlDbDataSource.java 0.0.1-SNAPSHOT
 *
 * Copyright Group B
 */

package grupb.upf.DBdatasource;

import org.xmldb.api.base.Collection;
import org.xmldb.api.base.XMLDBException;

/**
 * <p>This interface connects with the database.</p>
 *
 * @version    0.0.1-SNAPSHOT
 * @author     Group B
 */
public interface XmlDbDataSource {
    /**
     * This method catch the properties file.
     * @return The collection
     * @throws org.xmldb.api.base.XMLDBException Catch an error getting the data
     */
    Collection getCollection() throws XMLDBException;
    /**
     * This method gets user and password from the properties file.
     * @param aUserName The username
     * @param aPassword The pasword
     * @return Returns if the connection if OK/KO
     * @throws org.xmldb.api.base.XMLDBException Catch errors in the connection
     */
    Collection getCollection(String aUserName, String aPassword)
    throws XMLDBException;
}
